package com.njuse.jvmfinal.Instruction;

import java.nio.ByteBuffer;

import com.njuse.jvmfinal.runtimestructure.Jframe;

public class LLOAD extends Instruction {
	private int index;
	
	public  void readindex(ByteBuffer reader) {
		this.index= (int) reader.get();
	}
	
	public  void execute(Jframe frame) {
		int top=frame.getStacktop();
		Object[] stack=frame.getManagestack();
		stack[top]=frame.getLocal()[index];
		stack[top+1]=frame.getLocal()[index+1];
		top=top+2;
		frame.setManagestack(stack);
		frame.setStacktop(top);
	}
}
